<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2014 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
// 应用入口文件
error_reporting(E_ALL);
ini_set('display_errors', '1');
// 检测PHP环境
if(version_compare(PHP_VERSION,'5.3.0','<'))  die('require PHP > 5.3.0 !');

define('DS', DIRECTORY_SEPARATOR);
// 站点目录
define('SITE_DIR', dirname(__FILE__));
define('SITE_ROOT', dirname(dirname(__FILE__)));
// 站点地址
define('SCRIPT_DIR', rtrim(dirname($_SERVER['SCRIPT_NAME']), '\/\\'));
define('SITE_URL', 'http://'.$_SERVER['HTTP_HOST'] . SCRIPT_DIR);
//来源页面
define('HTTP_REFERER', isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '');
//文件上传根目录
define('UPLOAD_PATH', '/public/upload/');
// ThinkPHP定义
// 开启调试模式 建议开发阶段开启 部署阶段注释或者设为false
define('APP_DEBUG',true);
define('APP_NAME', 'Apps');
define('APP_PATH', ".". DS . 'Apps' . DS);
define('RUNTIME_PATH', "." . DS . 'public' . DS . 'Runtime' . DS);   // 系统运行时目录
define('THINK_PATH', "." . DS . 'Core' . DS . 'ThinkPHP' . DS);
require(THINK_PATH.'ThinkPHP.php');
// 亲^_^ 后面不需要任何代码了 就是如此简单

